const express = require('express')
const router = require('./router')

const app = express()

app.use(express.json())
app.use(express.urlencoded())
app.use('/todos',router)
app.use((req,res,next) => {
    res.status(404).send('404 Page Not Found...')
})
app.listen(3001, () => {
    console.log('server is running ...');
})